package com.kxn.multi.module.common.pojo;


/**
 * 错误返回码
 *
 */
public enum ResultCode {

    //http常用状态码
    UNAUTHORIZED(401, "Unauthorized"), //未授权
    FORBIDDEN(403, "Forbidden"), //禁止访问
    NOT_FOUND(404, "Not Found"), //404
    METHOD_NOT_ALLOWED(405, "Method Not Allowed"), //请求方法错误
    INTERNAL_SERVER_ERROR(500, "Internal Server Error"), //内部错误


    SUCCESS(0, "success"), //通用成功
    FAIL(400, "fail"), //通用失败

    //业务错误提示
    PARAMETER_ERROR(10000, "参数错误"); //参数错误




    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        String returnMsg = msg;
        return returnMsg;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    private int code;
    private String msg;
}
